package starter.kit.rx.app.feature.film;

import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;

import nucleus.factory.RequiresPresenter;
import starter.kit.feature.StarterFragConfig;
import starter.kit.feature.rx.RxStarterRecyclerFragment;
import starter.kit.rx.app.model.bean.top250.Subjects;

/**
 * ============================================================
 * 版权： xx有限公司 版权所有（c）2016
 * <p>
 * 作者：Loofer
 * 版本：1.0
 * 创建日期 ：2016/10/23 15:52.
 * 描述：豆瓣电影热映榜
 * <p>
 * 注:如果您修改了本类请填写以下内容作为记录，如非本人操作劳烦通知，谢谢！！！
 * Modified Date Modify Content:
 * <p>
 * ==========================================================
 */


@RequiresPresenter(FilmLivePresenter.class)
public class FilmLiveFragment extends RxStarterRecyclerFragment {

    public static FilmLiveFragment create() {

        Bundle args = new Bundle();
        FilmLiveFragment fragment = new FilmLiveFragment();
        fragment.setArguments(args);
        return fragment;
    }


    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);

        StarterFragConfig.Builder builder = new StarterFragConfig.Builder()
                .addLoadingListItem(false) // 是否分页
                .withIdentifierRequest(false)
                .pageSize(5)
                .recyclerLayoutManager(new GridLayoutManager(getActivity(), 3))
                .bind(Subjects.class, SubjectsViewHolder.class)
                .swipeRefreshLayoutColors(Color.BLUE, Color.GREEN, Color.RED, Color.YELLOW);

        buildFragConfig(builder.build());



    }
}
